<?php
require_once dirname(__FILE__) . '/../../../incls/php/dbutils.class.php';
require_once dirname(__FILE__) . '/../../../incls/php/miscutils.class.php';
require_once dirname(__FILE__) . '/../../../incls/php/config.php';
$myPdo = DbUtils::createPdoInst();
$page_id = MiscUtils::getParam('i', 0);

$order = MiscUtils::getParam('o', 't.name');
$queue = MiscUtils::getParam('q', 'ASC');
$items = DbUtils::get($myPdo,  TABLE_NAME_PREFIX_PLUGIN . 'ecom_brand', NULL, $order, $queue, NULL, NULL, NULL)->d;
?>
<!DOCTYPE html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <script type="text/javascript" src="../../../libs/jquery/jquery-1.6.2.min.js"></script>
  <link rel="stylesheet" type="text/css" href="carousel/css/style.css" media="screen" />
  <!-- ANIMATE AND EASING LIBRARIES -->
  <script type="text/javascript" src="carousel/services-plugin/js/jquery.easing.1.3.js"></script>
  <script type="text/javascript" src="carousel/services-plugin/js/jquery.cssAnimate.mini.js"></script>
  <!-- TOUCH AND MOUSE WHEEL SETTINGS -->
  <script type="text/javascript" src="carousel/services-plugin/js/jquery.touchwipe.min.js"></script>
  <script type="text/javascript" src="carousel/services-plugin/js/jquery.mousewheel.min.js"></script>
  <!-- jQuery SERVICES Slider  -->
  <script type="text/javascript" src="carousel/services-plugin/js/jquery.themepunch.services.min.js"></script>
  <link rel="stylesheet" type="text/css" href="carousel/services-plugin/css/settings.css" media="screen" />
</head>
<body>

      <div class="example-wrapper">
          <div id="services-example-1" class="theme1">
            <ul>
              <?php foreach ($items as &$item) { ?>
              <li style="text-align: center;" onclick="parent.location.href='<?php echo 'http://' . URL . '?i=' . BRD_ID . "&brd=$item->id"; ?>';">
                <img style="height: 40px; cursor: pointer;" class="thumb" src="<?php echo $item->file; ?>" data-bw="images/services/service1_bw.jpg">
                <b style="font-family: Lucida Sans Unicode;"><?php echo $item->name; ?></b>
              </li>
              <?php } ?>
            </ul>

            <!--  ###############   - TOOLBAR (LEFT/RIGHT) BUTTONS  - ###############  -->
            <div class="toolbar">
              <div class="left"></div><div class="right"></div>
            </div>
          </div>

      </div>
      <script type="text/javascript">
        var tpj=jQuery;
        tpj.noConflict();

        tpj(document).ready(function() {
          if (tpj.fn.cssOriginal!=undefined) {
            tpj.fn.css = tpj.fn.cssOriginal;
            tpj('#services-example-1').services({
              width:440,
              height:80,
              slideAmount:4,
              slideSpacing:5,
              carousel:"off",
              touchenabled:"on",
              mouseWheel:"on",
              hoverAlpha:"off",     // Turns Alpha Fade on/off by Hovering
              slideshow:0,        // 0 = No SlideShow, 1000 = 1 sec Slideshow (rotating automatically)
              hovereffect:"off",     // All Hovereffect on/off
              callBack:function() { }   //Callback any Function after loaded
            });
          }
        });
      </script>




  </body>
</html>
